package com.oceanread.cn.controller;
import com.oceanread.cn.entity.Postsql;

import com.oceanread.cn.service.IPostsqlService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author konglingxuan
 * @date 2021/11/1
 */
@RestController
@RequestMapping("/v1/test")
public class testController {

    @Autowired
    private IPostsqlService iPostsqlService;
    @GetMapping("/get")
    public List<Postsql> getAll() {
        return iPostsqlService.querys();
    }
    @PostMapping("/aa")
    public void aa(Object o)
    {
        System.out.println(o);
    }
}
